package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class SignedNumericLiteral implements Literal {

    private int beginIndex;
    private int endIndex;
    private Sign sign;
    private UnsignedNumericLiteral unsignedNumericLiteral;

    public SignedNumericLiteral(Sign sign, UnsignedNumericLiteral unsignedNumericLiteral) {
        if (sign != null) {
            this.beginIndex = beginIndex;
        } else {
            this.beginIndex = unsignedNumericLiteral.getBeginIndex();
        }
        this.endIndex = unsignedNumericLiteral.getEndIndex();
        this.sign = sign;
        this.unsignedNumericLiteral = unsignedNumericLiteral;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public Sign getSign() {
        return sign;
    }

    public UnsignedNumericLiteral getUnsignedNumericLiteral() {
        return unsignedNumericLiteral;
    }

}
